package com.bw.shopping.mvvm.model;

import com.bw.mvvm.entity.BaseEntity;
import com.bw.mvvm.entity.CartAddGoodsCodeEntity;
import com.bw.mvvm.entity.CartDelGoodsCodeEntity;
import com.bw.mvvm.entity.CartEntity;
import com.bw.mvvm.entity.PaySignEntity;
import com.bw.mvvm.entity.SeckillEntity;
import com.bw.mvvm.entity.SeckillMessagerEntity;
import com.bw.mvvm.entity.ShoppingEntity;
import com.bw.shopping.mvvm.model.entity.OrderAmountEntity;
import com.bw.shopping.mvvm.model.entity.OrderDetailsEntity;
import com.bw.shopping.mvvm.model.entity.SubmitEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.POST;

public interface Api {



    @POST("goods/getGoodsDetail")
    Observable<ShoppingEntity> requestShopping(@Body RequestBody body);

    @POST("cart/getList")
    Observable<CartEntity> requestCarList(@Body RequestBody body);

     //添加
    @POST("cart/add")
    Observable<CartAddGoodsCodeEntity> requestAddShop(@Body RequestBody body);

     //删除
    @POST("cart/delete")
    Observable<CartDelGoodsCodeEntity> requestDelShop(@Body RequestBody body);

    //提交
    @POST("cart/submit")
    Observable<CartDelGoodsCodeEntity> requestSubShop(@Body RequestBody body);

    //秒杀
    @POST("/secKill/seckilles")
    Observable<SeckillEntity> requestSeckill();



    @POST("/secKill/seckill")
    Observable<SeckillMessagerEntity> requestSeckillMessager(@Body RequestBody body);

    //提交订单

    @POST("/cart/submit")
    Observable<SubmitEntity> submitCart(@Body RequestBody body);

    //获取订单详情

    @POST("/order/getOrderById")
    Observable<OrderAmountEntity> requestOrderAmount(@Body RequestBody body);

    //购物车列表提交订单

    @POST("/order/submitOrder")
    Observable<OrderDetailsEntity> submitOrder(@Body RequestBody body);


    @POST("/pay/getPaySign")
    Observable<PaySignEntity> requestPay(@Body RequestBody body);

    @POST("/order/pay")
    Observable<PaySignEntity> requestOrderPay(@Body RequestBody body);
}
